let searchWord = ""
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    placeholder: {
      type: Object,
      value: '请输入关键词'
    }
  },
  externalClasses: [
    'iconfont',
    'icon-search',
  ],
  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    onInput(e) {
      searchWord = e.detail.value
    },
    searchKeyWord() {
      this.triggerEvent('search', {
        searchWord
      })
    },
  }
})
